package day0817;/**
 * @Author:galaxy_yan
 * @Date: 2022/8/17
 * @Time: 18:24
 * @Description
 *
作业标题(2437)
存在连续三个奇数的数组
 */public class text7 {
    public static void main(String[] args) {
        int[] arr={1,2,34,3,4,5,7,23,12};
        boolean a=func(arr);
        System.out.println(func(arr));
    }

    public static boolean func(int[] arr) {
        int count=0;
        for (int i :
                arr) {
            if (i % 2 == 1) {
                if(++count==3){
                    return true;
                }
            }else {
                count=0;
            }
        }
        return false;
    }
}
